<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<aside class="main-sidebar">
	<!-- sidebar: style can be found in sidebar.less -->
	<section class="sidebar">
		<!-- Sidebar user panel -->
		<div class="user-panel">
			<div class="pull-left image">
				<img src="${pageContext.request.contextPath}/img/user2-160x160.jpg"
					class="img-circle" alt="User Image">
			</div>
			<div class="pull-left info">
				<p> ${UserList.username}</p>
				<a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
			</div>
		</div>

<%--        ${UserList}--%>
<%--		${UserList}--%>
        <ul class="sidebar-menu">
            <li class="header">菜单</li>
            <li id="admin-index"><a
                    href="${pageContext.request.contextPath}/pages/main.jsp">
                <i class="fa fa-dashboard"></i> <span>首页</span></a>
            </li>
		 <c:forEach items="${UserList.permissions}" var="name">

              <c:if test="${name.pid==0}">
                <li class="treeview">
                    <a href="#"> <i class="fa fa-cogs"></i>
                        <span>${name.permissionName}</span>
                        <span class="pull-right-container"> <i
                                class="fa fa-angle-left pull-right"></i>
			        	</span>
                    </a>
                    <ul class="treeview-menu">

                    <c:forEach items="${UserList.permissions}" var="name2">

                        <c:if test="${name2.pid==name.id}">

                                <li id="system-setting"><a
                                        href="${pageContext.request.contextPath}${name2.url}"> <i
                                        class="fa fa-circle-o"></i> ${name2.permissionName}
                                </a></li>


                        </c:if>



                    </c:forEach>
                    </ul>
                </li>

              </c:if>
         </c:forEach>



        </ul>


		<!-- sidebar menu: : style can be found in sidebar.less
		<ul class="sidebar-menu">
			<li class="header">菜单</li>
			<li id="admin-index"><a
				href="${pageContext.request.contextPath}/pages/main.jsp"><i
					class="fa fa-dashboard"></i> <span>首页</span></a></li>

			<li class="treeview">
				<a href="#"> <i class="fa fa-cogs"></i>
					<span>系统管理</span> <span class="pull-right-container"> <i
						class="fa fa-angle-left pull-right"></i>
				</span>
				</a>

				<ul class="treeview-menu">

					<li id="system-setting"><a
						href="${pageContext.request.contextPath}/user/findAll.do"> <i
							class="fa fa-circle-o"></i> 用户管理
					</a></li>
					<li id="system-setting"><a
						href="${pageContext.request.contextPath}/role/findAll.do"> <i
							class="fa fa-circle-o"></i> 角色管理
					</a></li>
					<li id="system-setting"><a
						href="${pageContext.request.contextPath}/permission/findAll.do">
							<i class="fa fa-circle-o"></i> 资源权限管理
					</a></li>
					<li id="system-setting"><a
						href="${pageContext.request.contextPath}/sysLog/findAll.do"> <i
							class="fa fa-circle-o"></i> 访问日志
					</a></li>
				</ul></li>
			<li class="treeview"><a href="#"> <i class="fa fa-cube"></i>
					<span>基础数据</span> <span class="pull-right-container"> <i
						class="fa fa-angle-left pull-right"></i>
				</span>
			</a>
				<ul class="treeview-menu">

					<li id="system-setting"><a
						href="${pageContext.request.contextPath}/Product/select.do">
							<i class="fa fa-circle-o"></i> 产品管理
					</a></li>
					<li id="system-setting"><a
							href="${pageContext.request.contextPath}/Product/selectbyOut.do">
						<i class="fa fa-circle-o"></i> 已过时产品管理
					</a></li>
					<li id="system-setting"><a
							href="${pageContext.request.contextPath}/Route/selectRoute.do">
						<i class="fa fa-circle-o"></i> 路线管理
					</a></li>
					<li id="system-setting"><a
							href="${pageContext.request.contextPath}/vehice/selectVehicle.do">
						<i class="fa fa-circle-o"></i> 车辆管理
					</a></li>
					<li id="system-setting"><a
						href="${pageContext.request.contextPath}/Guide/openSaveGuide.do"> <i
							class="fa fa-circle-o"></i> 新增产品说明书
					</a></li>

				</ul></li>
			<li class="treeview"><a href="#"> <i class="fa fa-cube"></i>
				<span>客户管理</span> <span class="pull-right-container"> <i
						class="fa fa-angle-left pull-right"></i>
				</span>
			</a>
				<ul class="treeview-menu">
					<li id="add"><a
							href="${pageContext.request.contextPath}/orders/toAdd.do">
						<i class="fa fa-circle-o"></i> 添加订单
					</a></li>
					<li id="order-manage"><a
							href="${pageContext.request.contextPath}/orders/findAll.do">
						<i class="fa fa-circle-o"></i> 管理订单
					</a></li>
				</ul></li>
			<li class="treeview"><a href="#"> <i class="fa fa-cube"></i>
				<span>系统管理</span> <span class="pull-right-container"> <i
						class="fa fa-angle-left pull-right"></i>
				</span>
			</a>
				<ul class="treeview-menu">
					<li id="scheduler"><a
							href="${pageContext.request.contextPath}/scheduler/list.do">
						<i class="fa fa-circle-o"></i> 定时任务
					</a></li>
				</ul></li>
			<li class="treeview"><a href="#"> <i class="fa fa-cube"></i>
				<span>统计</span> <span class="pull-right-container"> <i
						class="fa fa-angle-left pull-right"></i>
				</span>
			</a>
				<ul class="treeview-menu">
					<li id="statistics-setting"><a
							href="${pageContext.request.contextPath}/statistics/turnover.do">
						<i class="fa fa-circle-o"></i> 营销额
					</a></li>
					<li id="user-portrait"><a
							href="${pageContext.request.contextPath}/statistics/portrait.do">
						<i class="fa fa-circle-o"></i> 用户画像
					</a></li>
					<li id="popular"><a
							href="${pageContext.request.contextPath}/statistics/popular.do">
						<i class="fa fa-circle-o"></i> 热门城市
					</a></li>
				</ul></li>
		</ul>

-->


	</section>
	<!-- /.sidebar -->
</aside>